package com.dgut.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dgut.pojo.OrderFlag;
import org.apache.ibatis.annotations.Update;

public interface OrderFlagMapper extends BaseMapper<OrderFlag> {


    //订单指派
    @Update("update order_flag set state = #{payment} , service_id = #{serviceId} where id = #{orderId};")
    public void assignOrder(Integer orderId , Integer serviceId,String payment);

    //订单审核通过
    @Update("update order_flag set state = #{confirmation} where id = #{orderId};")
    public int reviewOrderSuccessd(Integer orderId,String confirmation);


    //订单审核不通过
    @Update("update order_flag set state = #{processing} where id = #{orderId};")
    public int reviewOrderFailed(Integer orderId,String processing);

    //管理员取消订单
    @Update("update order_flag set exception_identification = #{cancelled} where id =#{orderId};")
    public int cancelOrder(Integer orderId,String cancelled);

    //更新订单异常状态
    @Update("update order_flag set exception_identification = #{state} where id =#{orderId};")
    int changeOrderExceptionState(int orderId,String state);

    //更新订单状态
    @Update("update order_flag set state = #{state} where id =#{orderId};")
    int changeOrderState(int orderId,String state);
    
}
